package org.test.client.ui.content.uifeature;

import javax.swing.JButton;

import org.test.client.listener.ToolTipMouseListener;
import org.test.client.ui.component.panel.TitlePanePanel;
import org.test.client.ui.skinui.btn.MyButtonUI;

public class ToolTipPanel extends TitlePanePanel{

	public ToolTipPanel() {
		super("ToolTip", null);
		doInit();
	}
	
	@Override
	public TitlePanePanel doInit() {
		super.doInit();
		
		
		JButton btn1 = new JButton("鼠标Rollover");
		JButton btn2 = new JButton("鼠标Rollover");
		btn2.setUI(MyButtonUI.createInfoBtnUI(btn2));
		JButton btn3 = new JButton("鼠标Rollover");
		btn3.setUI(MyButtonUI.createSuccessBtnUI(btn3));
		JButton btn4 = new JButton("鼠标Rollover");
		btn4.setUI(MyButtonUI.createWarningBtnUI(btn4));
		JButton btn5 = new JButton("鼠标Rollover");
		btn5.setUI(MyButtonUI.createWhiteBtnUI(btn5));
		
//		btn1.addMouseListener(new ToolTipMouseListener(btn1, "这是一个提示"));
		btn1.setToolTipText("aaaaa这是一个提示aaaa");
		
		btn2.addMouseListener(new ToolTipMouseListener(btn2, "这是一个提示22222222"));
		btn3.addMouseListener(new ToolTipMouseListener(btn3, "这是一个提示33333333333"));
		btn4.addMouseListener(new ToolTipMouseListener(btn4, "这是一个提示444444"));
		btn5.addMouseListener(new ToolTipMouseListener(btn5, "这是一个提示5555555555"));
		
		
		this.add(btn1);
		this.add(btn2);
		this.add(btn3);
		this.add(btn4);
		this.add(btn5);
		
		return this;
	}
	
	
}
